Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catalog #4714

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Catalog #4714

wants to merge 9 commits into from

Conversation

AlyonaV22
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on following the HTML structure and adhering to naming conventions! Just remember to keep the minor points in mind for future improvements. Your effort is commendable, and with a little more attention to detail, your code will be even better! 🚀 Keep up the good work!

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

<li class="nav__item">
<a
class="nav__link is-active"
href="https://apple.com"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'is-active' class should be 'nav__link--active' to follow the BEM methodology as per the checklist. The modifier should be separated from the block or element name by two hyphens.

<a
class="nav__link"
href="https://en.wikipedia.org/wiki/Laptop"
data-qa="nav-hover"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'data-qa' attribute is used for testing purposes. Ensure that its use here is intentional and that it follows the testing strategy of the project.

src/index.html Outdated
<a
href="#"
class="card__button"
data-qa="hover"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value of the 'data-qa' attribute should be 'card-hover' to maintain consistency across the project, as seen in line 149.

display: grid;
place-content: center;
place-items: center;
row-gap: 48px 46px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The row-gap property is used to set the vertical spacing between rows, but here it seems to have two values which is not valid for row-gap. If you intended to set both the row and column gaps, use the gap property instead.

}

.card {
box-sizing: border-box;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the Code Style Rules, it's recommended to avoid using box-sizing: border-box; multiple times. Consider creating a common class or using inheritance to apply this property once globally.

Comment on lines 57 to 66
.is-active::after {
position: absolute;
content: '';
display: block;
height: 4px;
width: 100%;
background-color: $blue-color;
border-radius: 8px;
bottom: 0;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ::after pseudo-element is used to create a visual effect under the .is-active class. Ensure that this effect is not causing any unintended layout shifts or accessibility issues. Also, verify that the $blue-color variable is defined in your variables file and is consistent with the design requirements.

Comment on lines 68 to 71
a[data-qa='nav-hover'] {
white-space: nowrap;
overflow: hidden;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The white-space and overflow properties are set to prevent the text inside the anchor from wrapping and overflowing. However, these properties are not necessary if the text content fits within the anchor's width. Make sure that it's actually required to use these properties for the [data-qa='nav-hover'] selector.

Comment on lines 81 to 83
.nav:hover .nav__link {
color: $blue-color;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule will change the color of .nav__link elements to $blue-color on hover of the .nav block. It might cause an unexpected behavior where all links change color even if only one is hovered. Consider applying the hover effect to .nav__link elements individually unless the group behavior is intentional.

Comment on lines 25 to 36
&:last-child::after {
position: absolute;
content: 'Reviews: 5';
color: $main-text-color;
white-space: nowrap;
font-size: 10px;
line-height: 14px;
top: 50%;
transform: translateY(-50%);
font-weight: 400;
right: -70px;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of ::after to add content like 'Reviews: 5' is not recommended for accessibility and semantic reasons. This content seems to be important information that should be part of the HTML document rather than CSS, as it does not appear to be purely decorative. Consider moving this content to the HTML and using an appropriate element and class to style it.

Comment on lines 40 to 42
.stars--4 .stars__star:nth-child(-n + 4) {
background-image: url(../images/star-active.svg);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The selector '.stars--4 .stars__star:nth-child(-n + 4)' specifies a modifier class 'stars--4', which is good. However, ensure that you have corresponding styles for other possible star ratings (e.g., '.stars--1', '.stars--2', '.stars--3', etc.) to match different rating scenarios. If they are missing, add them to maintain consistency and complete functionality.

Copy link

@BudnikOleksii BudnikOleksii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work 👍
Left some comments, check them. And a lot of tests fail, probably because you haven't fixed max-width for the container
image

src/index.html Outdated
<img
class="card__item"
src="./images/imac.jpeg"
alt="imac"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alt attribute should describe the image content
image

Comment on lines 12 to 31
.container {
grid-template-columns: repeat(1, 1fr);
}
}

@media (min-width: 488px) {
.container {
grid-template-columns: repeat(2, 1fr);
}
}

@media (min-width: 768px) {
.container {
grid-template-columns: repeat(3, 1fr);
}
}

@media (min-width: 1024px) {
.container {
grid-template-columns: repeat(4, 1fr);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use nesting in scss

Comment on lines 119 to 127
.card:hover {
transform: scale(1.2);
}

.card:hover .card__title {
color: $title-color;
}

.card__button:hover {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nesting

height: 40px;
}

.nav {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a separate file per each styles block

}

.nav {
transition: all 300ms ease;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify to which properties should transition apply instead of all

}
}

.nav__list {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use nesting, fix in all places

Comment on lines 68 to 74
a[data-qa='nav-hover'] {
white-space: nowrap;
overflow: hidden;
}

a[data-qa='nav-hover']:hover {
color: $blue-color;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use data-qa selector, it for tests only, all links should have hover effect

}
}

.stars--4 .stars__star:nth-child(-n + 4) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be the same functionality as in the stars task, if the modifier is --3 you should show 3 active stars, if --4 - four, and so on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants